package com.mmall.service;

import com.mmall.common.ServerResponse;
import com.mmall.pojo.Goods;

import java.util.List;

public interface GoodsService {

    /**
     * 添加
     * @param goods
     * @return
     */
    ServerResponse insertGoods(Goods goods);

    /**
     * 查询
     * @param id
     * @return
     */
    ServerResponse selectGoods(Integer id,Integer userId);

    /**
     * 修改
     * @param goods
     * @return
     */
    ServerResponse updateGoods(Goods goods);

    /**删除
     *
     * @param id
     * @return
     */
    ServerResponse deleteGoods(Integer id);

    /**
     * 查询用户发布的商品列表
     * @param userId
     * @return
     */
    ServerResponse findGoodsListByUserId(Integer userId);

    /**
     * 查询所有商品
     * @return
     */
    ServerResponse findAll();

    /**
     * 查询宝贝信息并带出默认收货地址
     * @param id
     * @return
     */
    ServerResponse findGoodsWithDefaultAdress(Integer id,Integer userId);

    ServerResponse collectionGoods(Integer userId,Integer goodsId);

    ServerResponse cancelCollectionGoods(Integer userId,Integer goodsId);

    ServerResponse selectListByGoodsType(String goodsType);

    ServerResponse findListByEntity(Goods goods);

    ServerResponse findCollectionList(Integer userId);

}
